#pragma once

class CLockGuard
{
public:

	CLockGuard(LPCRITICAL_SECTION cs)
	{
		m_cs = cs;
		EnterCriticalSection(m_cs);
	}

	~CLockGuard(void)
	{
		LeaveCriticalSection(m_cs);
	}

private:
	LPCRITICAL_SECTION m_cs;
};
